#ifndef VLMODEBUTTON_H
#define VLMODEBUTTON_H

#include <QPushButton>
#include <QMouseEvent>
#include <string>
using namespace std;

class VLModeButton : public QPushButton
{
    Q_OBJECT
public:
    explicit VLModeButton(const QString &mode, QWidget *parent = 0);
    explicit VLModeButton(const QString &text, const QString &mode, QWidget *parent = 0);
    explicit VLModeButton(const QIcon &icon, const QString &text, const QString &mode, QWidget *parent = 0);

    
signals:
    void clicked(const QString &mode);
public slots:
    void click();

protected:
    void mousePressEvent(QMouseEvent *e);
    void mouseReleaseEvent(QMouseEvent *e);

private:
    bool mouseDown;
    const QString modeVal;
};

#endif // VLMODEBUTTON_H
